<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<title>商品套餐</title>
<link rel="stylesheet" href="/Public/Admin/css/main.css"/>
</head>
<body>
<div class="view-content" style="padding: 0">
	<div class="view-con">
		<div class="AddProducts">
			<ul class="APList">
				<li class="active <?php if($color_display['one'] == 1): ?>Act ActMain<?php endif; ?> jump" alt="1" about="2">
					<span>基本信息</span>
					<div class="APListPre">
						<i>1</i>
					</div>
				</li>
				<li class="active <?php if($color_display['two'] == 1): ?>Act ActMain<?php endif; ?>">
					<span>商品套餐</span>
					<div class="APListPre">
						<i>2</i>
					</div>
				</li>
				<li class="last jump" alt="3" about="2">
					<span <?php if($color_display['three'] == 1): ?>style="color:#0095d4"<?php endif; ?>>商品详情页</span>
					<div class="APListPre" <?php if($color_display['three'] == 1): ?>style="background-color: #0095d4;border: 2px solid #0095d4 !important;color: #fff !important;"<?php endif; ?>>
						<i>3</i>
					</div>
				</li>
			</ul>
		</div>
		<div class="AddShopping">
			<div class="PackageHead">
				<span class="lf">可将商品以单品或套餐组合的形式进行销售，最多可添加10个套餐，每个套餐中最多可添加5个产品。</span>
				<div class="rt BookAppend">
					<i>+</i>
					<em>添加套餐</em>
				</div>
			</div>
			<div class="PackageManager">
				<input type="hidden" value="<?php echo ($id); ?>" name="id"/>
				<div class="PackageList">
					<ul>
						<?php if(!empty($package_list)): if(is_array($package_list)): foreach($package_list as $k=>$vo): ?><li <?php if($k == 0): ?>class="active"<?php endif; ?>>套餐<em class="CaseNum"></em><i class="Icl"></i></li><?php endforeach; endif; ?>
							<?php else: ?>
							<li class="active">套餐<em class="CaseNum"></em><i class="Icl"></i></li><?php endif; ?>
					</ul>
				</div>
				<div class="PMForms">
					<form id="PMForm">
						<?php if(!empty($package_list)): if(is_array($package_list)): foreach($package_list as $key=>$package): ?><div class="IsClone">
									<div class="APLabelTo">
										<span class="span1"><i class="rod">*</i>套餐名称</span>
										<label>
											<input type="text" name="package_name" class="PMName" onchange="packagename_verify(this)" value="<?php echo ($package['package_name']); ?>" maxlength="25"/>
										</label>
										<div class="RexExps">请输入套餐名称</div>
									</div>
									<div class="APLabelTo">
										<span class="span1"><i class="rod">*</i>套餐价格</span>
										<label>
											<input type="text" name="package_price" class="PMPrice" onchange="package_price_verify(this)" value="<?php echo ($package['package_price']); ?>"/>
										</label>
										<div class="PMPriceDw">元</div>
										<div class="RexExps">请输入套餐价格</div>
									</div>
									<!--  分割线及以下列表  -->
									<div class="SAppendMain">
											<?php if(!empty($package['product_list'])): if(is_array($package['product_list'])): foreach($package['product_list'] as $key=>$product): ?><div class="SliceAppend">
														<div class="dashed">
															<span class="lf">产品<em class="ISToNum"></em></span>
															<i class="DashedNo"></i>
															<div class="DashedX"></div>
														</div>
														<div class="APLabelTo">
															<span class="span1"><i class="rod">*</i>产品名称</span>
															<label>
																<input type="text" name="product_name" class="PMSHName" onchange="product_name_verify(this)" value="<?php echo ($product['product_name']); ?>" maxlength="25"/>
															</label>
															<div class="MPSlice">
																<i>+</i>
																<em>添加属性</em>
															</div>
															<div class="RexExps">请输入产品名称</div>
														</div>
														<div class="APLabelTo">
															<span class="span1">产品属性</span>
															<div class="PMTabel">
																<table width="100%" cellpadding="0" cellspacing="0" border="0">
																	<thead>
																	<tr>
																		<th width="20%">
																			<div class="cell">属性名称(如：颜色)</div>
																		</th>
																		<th width="60%">
																			<div class="cell">属性值(如：红色)</div>
																		</th>
																		<th width="20%"></th>
																	</tr>
																	</thead>
																	<tbody>
																	<tr class="NoneS">
																		<td></td>
																		<td></td>
																		<td></td>
																	</tr>
																	<?php if(!empty($product['attribute_name_list'])): if(is_array($product['attribute_name_list'])): foreach($product['attribute_name_list'] as $key=>$attribute_name): ?><tr class="insert">
																				<td>
																					<div class="cell">
																						<label><input type="text" name="attribute_name" class="SXName" maxlength="10" placeholder="请输入属性名称" value="<?php echo ($attribute_name['attribute_name']); ?>" disabled="disabled"></label>
																					</div>
																				</td>
																				<td>
																					<div class="CellContent" style="display: inline-block;">
																						<?php foreach($attribute_name['attribute_val_list'] as $val_list){?>
																						<div class="cell cells" style="display: inline-block;">
																							<label><input type="text" maxlength="25" name="attribute_val" class="SXStr" onblur="locking(this)" value="<?php echo $val_list['attribute_val'];?>" disabled="disabled"></label><i class="CellsClose" style="display: none;"></i>
																						</div>
																						<?php }?>
																					</div>
																					<div class="cellTo" style="display: none;">+</div>
																				</td>
																				<td>
																					<div class="BtnSp">
																						<button type="button" class="SPOver" onclick="attribute_name_edit(this)">编辑</button><button type="button" class="SPOut"></button>
																					</div>
																				</td>
																			</tr><?php endforeach; endif; endif; ?>
																	</tbody>
																</table>
																<div class="TabelMed">请添加属性</div>
															</div>
															<div class="RexExps">有属性未保存</div>
														</div>
													</div><?php endforeach; endif; ?>
											<?php else: ?>
												<div class="SliceAppend">
													<div class="dashed">
														<span class="lf">产品<em class="ISToNum"></em></span>
														<i class="DashedNo"></i>
														<div class="DashedX"></div>
													</div>
													<div class="APLabelTo">
														<span class="span1"><i class="rod">*</i>产品名称</span>
														<label>
															<input type="text" name="product_name" class="PMSHName" onchange="product_name_verify(this)"/>
														</label>
														<div class="MPSlice">
															<i>+</i>
															<em>添加属性</em>
														</div>
														<div class="RexExps">请输入产品名称</div>
													</div>
													<div class="APLabelTo">
														<span class="span1">产品属性</span>
														<div class="PMTabel">
															<table width="100%" cellpadding="0" cellspacing="0" border="0">
																<thead>
																<tr>
																	<th width="20%">
																		<div class="cell">属性名称(如：颜色)</div>
																	</th>
																	<th width="60%">
																		<div class="cell">属性值(如：红色)</div>
																	</th>
																	<th width="20%"></th>
																</tr>
																</thead>
																<tbody>
																<tr class="NoneS">
																	<td></td>
																	<td></td>
																	<td></td>
																</tr>
																</tbody>
															</table>
															<div class="TabelMed">请添加属性</div>
														</div>
														<div class="RexExps">有属性未保存</div>
													</div>
												</div><?php endif; ?>
									</div>
									<div class="APSliceTo">
										<div class="APSliceCon">
											<i>+</i>
											<em>添加产品</em>
										</div>
									</div>
								</div><?php endforeach; endif; ?>
							<?php else: ?>
							<div class="IsClone">
								<div class="APLabelTo">
									<span class="span1"><i class="rod">*</i>套餐名称</span>
									<label>
										<input type="text" name="package_name" class="PMName" onchange="packagename_verify(this)" maxlength="25"/>
									</label>
									<div class="RexExps">请输入套餐名称</div>
								</div>
								<div class="APLabelTo">
									<span class="span1"><i class="rod">*</i>套餐价格</span>
									<label>
										<input type="text" name="package_price" class="PMPrice" onchange="package_price_verify(this)"/>
									</label>
									<div class="PMPriceDw">元</div>
									<div class="RexExps">请输入套餐价格</div>
								</div>
								<!--  分割线及以下列表  -->
								<div class="SAppendMain">
									<div class="SliceAppend">
										<div class="dashed">
											<span class="lf">产品<em class="ISToNum"></em></span>
											<i class="DashedNo"></i>
											<div class="DashedX"></div>
										</div>
										<div class="APLabelTo">
											<span class="span1"><i class="rod">*</i>产品名称</span>
											<label>
												<input type="text" name="product_name" class="PMSHName" onchange="product_name_verify(this)" maxlength="25"/>
											</label>
											<div class="MPSlice">
												<i>+</i>
												<em>添加属性</em>
											</div>
											<div class="RexExps">请输入产品名称</div>
										</div>
										<div class="APLabelTo">
											<span class="span1">产品属性</span>
											<div class="PMTabel">
												<table width="100%" cellpadding="0" cellspacing="0" border="0">
													<thead>
													<tr>
														<th width="20%">
															<div class="cell">属性名称(如：颜色)</div>
														</th>
														<th width="60%">
															<div class="cell">属性值(如：红色)</div>
														</th>
														<th width="20%"></th>
													</tr>
													</thead>
													<tbody>
													<tr class="NoneS">
														<td></td>
														<td></td>
														<td></td>
													</tr>
													</tbody>
												</table>
												<div class="TabelMed">请添加属性</div>
											</div>
											<div class="RexExps">有属性未保存</div>
										</div>
									</div>
								</div>
								<div class="APSliceTo">
									<div class="APSliceCon">
										<i>+</i>
										<em>添加产品</em>
									</div>
								</div>
							</div><?php endif; ?>
					</form>
				</div>
			</div>
			<div class="Book5">
				<button type="button" class="APBtns" alt="false">保存并下一步</button>
			</div>
		</div>
	</div>
</div>
<div class="TxtBack">
	<div class="TxtBackBg"></div>
	<div class="TxtBackPre">
		<div class="TBTop">
			<span class="lf">提示信息</span>
			<i class="TBClose"></i>
		</div>
		<div class="TBText">是否删除此套餐</div>
		<div class="TBYn">
			<div class="TBNo">取消</div>
			<div class="TBYes">确定</div>
		</div>
	</div>
</div>
<div class="tipsSave">
	<div class="saveTip">
		<div class="h3">提示</div>
		<div class="close"></div>
		<div class="saveContent">
			<p>请先保存当前页面信息</p>
		</div>
		<div class="saveBtns">
			<button type="button" class="saveTo">确定</button>
		</div>
	</div>
</div>
<script src="/Public/Admin/js/jquery-1.12.4.js"></script>
<script src="/Public/Admin/js/swiper.min.js"></script>
<script src="/Public/Admin/js/colpack.js"></script>
<script src="/Public/Admin/js/main.js?v=<?php echo time();?>"></script>
<script src="/Public/Admin/js/package.js?v=<?php echo time();?>"></script>
</body>
</html>